home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-11-15 | 7.8 KB | 269 lines | [TEXT/MPS ] |
- //
- // myFolderMrg.r
- //
- // This installer script source demonstrates use of
- // the 'folder' or 'folder merge' atom ( 'infm' ).
- //
- // The advantage to using a folder merge atom within
- // your installer script is that once the script has
- // been completed, the actual contents of the folder
- // described by the folder merge atom can change, and
- // no changes are needed in the Installer source script.
- // Whatever files are contained in the folder will
- // automatically be included. You must however run
- // ScriptCheck on the source script so that the Installer
- // will know the actual size of the folder to be installed.
- //
- // Use of the "folder-user:" path is supported allowing users
- // to select the target path for the files contained in the
- // folder.
- //
- // Use of the "special-xxxx" paths for installing files to
- // the user's system folder is not currently supported.
- //
- // Use of InstaCompOne compression is not currently supported
- // for use with folder merge atoms.
- //
- // NOTE: As of Installer 4.0.3 the feature allowing the scriptwriter
- // to implement installation of a Custom Icon is broken. Currently
- // the Installer fails to set the "use Custom Icon" bit in the
- // Finder Attributes flag of the target folder. I have included
- // an example of installing an icon file anyway, so that when this
- // problem is fixed, those who would like to implement it will have
- // the information necessary. An 'after' Action Atom can be used to work
- // around this bug. Contact DTS (AL: DEV.SUPPORT) for more information.
- //
- //
- // mark young • 08/20/94
- //
- // Copyright 1993-1994, Apple Computer, Inc., All Rights Reserved
- //
-
- #include "InstallerTypes.r"
-
-
- // • packages
-
- resource 'inpk' (100) {
- format0 {
- showsOnCustom,
- removable,
- dontForceRestart,
- 0,
- 0,
- "Folder Merge to \"FolderMerge Example:\" folder",
- {
- 'infm', 1000;
- },
- }
- };
-
- resource 'inpk' (200) {
- format0 {
- showsOnCustom,
- removable,
- dontForceRestart,
- 0,
- 0,
- "Folder Merge to User Selected folder",
- {
- 'infm', 2000;
- },
- }
- };
-
- resource 'inpk' (300) {
- format0 {
- showsOnCustom,
- removable,
- dontForceRestart,
- 0,
- 0,
- "Folder Merge with Custom Icon",
- {
- 'infm', 3000;
- },
- }
- };
-
-
- // • folder merge atoms
-
- // folder atom that installs all files within source folder
- // to ":Folder Merge Example:" folder on target volume
- resource 'infm' (1000) {
- format0{
- 0, // folder size
- 10001, // target spec
- 10000, // source spec
- "TeachText • folder1" // description
- };
- };
-
-
- // folder atom that installs all files within source folder
- // to user selected folder on target volume
- resource 'infm' (2000) {
- format0{
- 0, // folder size
- 20001, // target spec
- 20000, // source spec
- "TeachText • folder2" // description
- };
- };
-
-
-
- // folder atom that installs all files within source folder
- // to ":Folder Custom Icon Example:" folder on target volume
- //
- // EXPLANATION OF CUSTOM ICON FILE: A custom icon can be
- // added to the source folder by performing a GetInfo on
- // the source folder from the Finder. In the upper left
- // hand corner of the GetInfo dialog there is a place that
- // icons can be copied from and pasted to. If a folder has
- // a Custom Icon, that icon will appear as an invisible file
- // within the folder. The icon will have the filename of "icon\n".
- //
- // NOTE: As of Installer 4.0.3 the Custom Icon installation
- // is broken. The problem is that the "Custom Icon" bit
- // for the Finder Attributes flags for the target folder is not
- // being set correctly. An 'after' Action Atom can be used to
- // work around this bug. Contact DTS (AL: DEV.SUPPORT) for more
- // information.
-
- resource 'infm' (3000) {
- format0{
- 0, // folder size
- 30001, // target spec
- 30000, // source spec
- "TeachText • folder3" // description
- };
- };
-
-
- // • source and target specs
-
- // target file spec for folder merge atom
- resource 'intf' (10001) {
- format1 {
- noSearchForFile, // use default search path
- 0, // ignored in folder merge atoms
- 0, // ignored in folder merge atoms
- 0, // ignored in folder merge atoms
- 0, // ignored in folder merge atoms
- 0, // ignored in folder merge atoms
- 0, // ignored in folder merge atoms
- 0, // search proc ID ( 'insp' ), none used
- ":FolderMerge Example:" // path to target folder
- }
- };
-
- // source file spec for folder merge atom
- resource 'infs' (10000) {
- 'APPL', // ignored in folder merge atoms
- 'ttxt', // ignored in folder merge atoms
- 0x1, // ignored in folder merge atoms
- noSearchForFile, // ignored in folder merge atoms
- TypeCrMustMatch, // ignored in folder merge atoms
- "Disk 1:folder1:" // path to source folder
- };
-
- // target file spec for folder merge atom
- resource 'intf' (20001) {
- format1 {
- noSearchForFile, // use default search path
- 0, // ignored in folder merge atoms
- 0, // ignored in folder merge atoms
- 0, // ignored in folder merge atoms
- 0, // ignored in folder merge atoms
- 0, // ignored in folder merge atoms
- 0, // ignored in folder merge atoms
- 0, // search proc ID ( 'insp' ), none used
- "folder-user:" // path to target folder
- }
- };
-
- // source file spec for folder merge atom
- resource 'infs' (20000) {
- 'APPL', // ignored in folder merge atoms
- 'ttxt', // ignored in folder merge atoms
- 0x1, // ignored in folder merge atoms
- noSearchForFile, // ignored in folder merge atoms
- TypeCrMustMatch, // ignored in folder merge atoms
- "Disk 1:folder2:" // path to source folder
- };
-
- // target file spec for folder merge atom
- resource 'intf' (30001) {
- format1 {
- noSearchForFile, // use default search path
- 0, // ignored in folder merge atoms
- 0, // ignored in folder merge atoms
- 0, // ignored in folder merge atoms
- 0, // ignored in folder merge atoms
- 0, // ignored in folder merge atoms
- 0, // ignored in folder merge atoms
- 0, // search proc ID ( 'insp' ), none used
- ":Folder Custom Icon Example:" // path to target folder
- }
- };
-
-
- // source file spec for folder merge atom
- resource 'infs' (30000) {
- 'APPL', // ignored in folder merge atoms
- 'ttxt', // ignored in folder merge atoms
- 0x1, // ignored in folder merge atoms
- noSearchForFile, // ignored in folder merge atoms
- TypeCrMustMatch, // ignored in folder merge atoms
- "Disk 1:folder3:" // path to source folder
- };
-
-
-
- resource 'inpr' ( 300 ) {
- format0{
- useFolderTargetMode, // allow user to select target folder
- // instead of only choosing target volume
-
- dontAllowUserToSetSystemDisk, // don't allow user to override default
- // volume as destination for system files
-
- showSelectedSizeInCustom, // show user how much disk space will be
- // required for installation of selected files
-
- noSetupFUnctionSupplied, // not using a setup function code resource
-
- allowCleanInstall, // if user pressed CTRL/SHFT/K then a copy of
- // System Folder will be created and System files
- // will always be installed to a new folder
-
- dontAllowServerAsTarget, // don't allow user to install to
- // an Apple Share volume or server
-
- '', // setup function type ( none supplied )
- 0, // setup function code rsrc ID ( none supplied )
- {
-
- // help page #1
- 301, // B/W • resource ID of 'PICT' item
- 311, // B/W • resource ID of 'TEXT' item
- 301, // 8-Bit Color • resource ID of 'PICT' item
- 311, // 8-Bit Color • resource ID of 'PICT' item
-
- // help page #2
- 302, // B/W • resource ID of 'PICT' item
- 312, // B/W • resource ID of 'TEXT' item
- 302, // 8-Bit Color • resource ID of 'PICT' item
- 312, // 8-Bit Color • resource ID of 'PICT' item
-
- },
- "Sample Folder"
- }
-
- };
-
-
-
-